<!DOCTYPE html>
<html>
<head>
	<title>Arrows mode</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myTabbar;
		function doOnLoad() {
			myTabbar = new dhtmlXTabBar({
				parent: "my_tabbar",
				close_button: true
			});
			for (var q=0; q<3; q++) addTab();
		}
		var tabIndex = 1;
		function addTab() {
			if (myTabbar.getAllTabs().length < 9) {
				myTabbar.addTab(tabIndex, "Tab "+tabIndex);
				if (myTabbar.getAllTabs().length == 1) myTabbar.tabs(tabIndex).setActive();
				tabIndex++;
			} else {
				if (dhtmlx && dhtmlx.message) dhtmlx.message({text:"Too many tabs. Maximum 10 tabs allowed as a time.", expire: 5000});
			}
		}
		function setArrowsMode(mode) {
			myTabbar.setArrowsMode(mode);
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="my_tabbar" style="width:395px; height:390px;"></div>
	<br><br>
	<button onclick='addTab();'>add tab</button>
	<button onclick='setArrowsMode("auto");'>mode:auto</button>
	<button onclick='setArrowsMode("always");'>mode:always</button>
</body>
</html>
